Gets the second of the year represented by this instance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(DateTime), | intent(in) | :: | time |
FUNCTION SecondOfYear & ! (time) & ! RESULT (second) USE Units, ONLY: & ! Imported parameters: day, hour, minute IMPLICIT NONE ! Arguments with intent(in): TYPE (DateTime), INTENT(IN) :: time ! Local variables: INTEGER (KIND = short) :: second !------------end of declaration------------------------------------------------ second = (DayOfYear (time) - 1) * day second = second + GetHour (time) * hour + GetMinute (time) * minute + & GetSecond (time) END FUNCTION SecondOfYear